<template>
  <div>
    HOME
  </div>
</template>
<script setup lang="ts">
  import { onMounted } from 'vue'
  import { useRouter } from 'vue-router'
  // 负责整个应用的路由器 router
  const router = useRouter();
  onMounted(() => {
    setTimeout(() => {
      console.log("Home组件挂载了");
      // 跳转  编程式路由跳转
      router.push('/news')
      // 不允许回退
      router.replace()
    }, 3000)
  })

  // 接口
  interface NewsInter {
    id: string,
    name: string,
    content: string
  }

  // 方法
</script>
<style lang="ts">

</style>